package com.ecity.table {
	import com.ecity.events.GameEvent;
	import flash.display.Sprite;
	import gs.TweenLite;
	/**
	 * ...
	 * @author ss
	 */
	public class Desktop extends TableDisplayObject	{
		private var _initpage:Sprite;
		private var _background:Sprite;
		private var _rulepage:Sprite;
		
		
		public function Desktop(){
			
		}
		
		/**
		 * 显示背景，隐藏开始页面和规则页面
		 */
		public function showBackground():void {
			_initpage = getLayer("initpage");
			_rulepage = getLayer("rulepage");
			TweenLite.to(_rulepage, 1, { alpha:0 } );
			TweenLite.to(_initpage, 1, {delay:1,alpha:0,onComplete:onBackgroundInit} );
		}
		/**
		 * 背景图显示后，发送事件，请求添加开始按钮；
		 */
		private function onBackgroundInit():void {
			this.dispatchEvent(new GameEvent(GameEvent.BACKGROUND_INITED));
		}
		
	}

}